#include<iostream>
#include<string>
#include<map>
#include<algorithm>
using namespace std;
bool isAnagram(std::string s, std::string t) {
	if (s.size() != t.size())
	{
		return false;
	}
	int tmp[26] = { 0 };
	int smp[26] = { 0 };
	for (int i = 0; i < s.size(); ++i)
	{
		smp[s[i] - 'a']++;
		tmp[t[i]-'a']++;
	}
	for (int i = 0; i < 26; ++i)
	{
		if (smp[i]!=tmp[i])
		{
			return false;
		}
	}
	return true;
}

bool finchar(char& s)
{
	char tmp[10] = { 'a','e','i','o','u','A','E','I','O','U' };
	for (int i = 0; i < 10; ++i)
	{
		if (tmp[i] == s)
			return true;
	}
	return false;

}
bool halvesAreAlike(string s) {
	
	int len = s.size() / 2;
	int asize = 0, bsize = 0;
	for (int i = 0; i < s.size(); ++i)
	{
		if (i<len && finchar(s[i]))
		{
			asize++;
		}
		if (i >= len && i < s.size() && finchar(s[i]))
		{
			bsize++;
		}
	}
	if (bsize == asize)
	{
		return true;
	}
	else
	{
		return false;
	}

}
int main()
{
	//std::string s1, s2;
	//std::cin >> s1 >> s2;
	//std::cout << isAnagram(s1, s2) << std::endl;

	string s;
	cin >> s;
	cout << halvesAreAlike(s) << endl;

	return 0;
}